package com.eas.task.transform.util;

public class SortUtil {

    private float lastScore;

    private int lastRank;

    private int totalCount;

    public int getRank(float score) {
        totalCount++;
        if (score == lastScore) {
            return lastRank;
        } else {
            lastRank = totalCount;
            lastScore = score;
            return lastRank;
        }
    }

    public float getLastScore() {
        return lastScore;
    }

    public void setLastScore(float lastScore) {
        this.lastScore = lastScore;
    }

    public int getLastRank() {
        return lastRank;
    }

    public void setLastRank(int lastRank) {
        this.lastRank = lastRank;
    }

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }
}
